{extend  name="manage@public/layout" /}
{block name="content"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商户信息</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content form-horizontal">
                        
                            <div class="form-group">
                                <label class="col-sm-2 control-label">商户号</label>

                                <div class="col-sm-3">
                                    <input type="text" disabled value="{$auth_mch->mch}" class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">秘钥</label>

                                <div class="col-sm-3">
                                    <input type="text" disabled value="{$auth_mch->md5key}" class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary bt-reset" type="submit">重置秘钥</button>
                                </div>
                            </div>
                    </div>
                </div>
            </div>
        </div>
    </div>   
    {/block}
    {block name="script"}
<script>
  $(".bt-reset").click(function(){
      $.post("/web/reset_md5key",function(result){
        parent.layer.msg(result['msg']);
        setTimeout(function() {
                window.location.reload();
            }, 1000)
      })
  })
</script>
 {/block}
